namespace ShapesLib
{
    using System;
    using System.Collections.Generic;
    using System.Drawing;
    using System.Text;

    /// <summary>
    /// Main class to be able to draw shapes.
    /// </summary>
    public abstract class Shape
    {
        #region Members
        /// <summary>
        /// variable to fill color.
        /// </summary>
        private Color privateFillColor;

        /// <summary>
        /// X of the shape
        /// </summary>
        private int privateX;

        /// <summary>
        /// Y of the shape.
        /// </summary>
        private int privateY;

        #region Section3
        /// <summary>
        /// Pen color drawing with.
        /// </summary>
        private Color privatePenColor;

        /// <summary>
        /// Pen width.
        /// </summary>
        private float privatePenWidth;
        #endregion
        #endregion

        #region Section3 constructor(s)
        /// <summary>
        /// Initializes a new instance of the <see cref="Shape"/> class.
        /// </summary>
        public Shape()
        {
            this.PenColor = Color.Black;
            this.PenWidth = 1.5f;
        }
        #endregion

        #region Properities
        /// <summary>
        /// Gets or sets the X.
        /// </summary>
        /// <value>
        /// The X.
        /// </value>
        public int X
        {
            get { return this.privateX; }
            set { this.privateX = value; }
        }

        /// <summary>
        /// Gets or sets the Y.
        /// </summary>
        /// <value>
        /// The Y.
        /// </value>
        public int Y
        {
            get { return this.privateY; }
            set { this.privateY = value; }
        }

        /// <summary>
        /// Gets or sets the color of the fill.
        /// </summary>
        /// <value>
        /// The color of the fill.
        /// </value>
        public Color FillColor
        {
            get { return this.privateFillColor; }
            set { this.privateFillColor = value; }
        }

        #region Section3
        /// <summary>
        /// Gets or sets the color of the pen.
        /// </summary>
        /// <value>
        /// The color of the pen.
        /// </value>
        public Color PenColor
        {
            get { return this.privatePenColor; }
            set { this.privatePenColor = value; }
        }

        /// <summary>
        /// Gets or sets the width of the pen.
        /// </summary>
        /// <value>
        /// The width of the pen.
        /// </value>
        public float PenWidth
        {
            get { return this.privatePenWidth; }
            set { this.privatePenWidth = value; }
        }
        #endregion
        #endregion

        #region Methods
        /// <summary>
        /// Draws the specified g.
        /// </summary>
        /// <param name="g">The g.</param>
        public abstract void Draw(Graphics g);

        /// <summary>
        /// Scales the specified factor.
        /// </summary>
        /// <param name="factor">The factor.</param>
        public abstract void Scale(double factor);
        
        #region Section2

        /// <summary>
        /// Points the in shape.
        /// </summary>
        /// <param name="x">The x.</param>
        /// <param name="y">The y.</param>
        /// <returns>
        /// True if point is in the shape.
        /// </returns>
        public abstract bool PointInShape(int x, int y);
        #endregion

        #region Section3
        /// <summary>
        /// Draws for creation.
        /// </summary>
        /// <param name="g">The g.</param>
        public abstract void DrawForCreation(Graphics g);

        /// <summary>
        /// Translates the specified delta X.
        /// </summary>
        /// <param name="deltaX">The delta X.</param>
        /// <param name="deltaY">The delta Y.</param>
        public virtual void Translate(int deltaX, int deltaY)
        {
            this.X += deltaX;
            this.Y += deltaY;
        }
        #endregion
        
        #endregion
    }
}
